Skip to content

[CodingStyle] Deprecate EnumCaseToPascalCaseRector as risky change#8095

Merged
TomasVotruba merged 1 commit into
mainfrom
deprecate-enum-case-pascal-case
Jun 28, 2026
Merged

[CodingStyle] Deprecate EnumCaseToPascalCaseRector as risky change#8095
TomasVotruba merged 1 commit into
mainfrom
deprecate-enum-case-pascal-case

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Jun 28, 2026

Copy link
Copy Markdown
Member

Deprecate EnumCaseToPascalCaseRector.

The rule renames enum cases to PascalCase, but it cannot reliably track every usage of an enum case across the whole context. That makes it a risky change with little value.

Better handled via IDE with full context, manually, or a custom rule where needed.

It does not handle enum usage across the whole context. Better handled
via IDE with full context, manually, or a custom rule.
@TomasVotruba TomasVotruba merged commit 6ab5370 into main Jun 28, 2026
65 checks passed
@TomasVotruba TomasVotruba deleted the deprecate-enum-case-pascal-case branch June 28, 2026 13:07
@calebdw

calebdw commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

I actually really like this and use it...

@TomasVotruba

Copy link
Copy Markdown
Member Author

Still dangerous, as it does not update all references. Similar to rectorphp/rector#8439
Use local copy if you need it and willing to take the rist.

@calebdw

calebdw commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Can you not just put it into a "Risky Rules" set that has to be opted in so that it's clear it's risky?

@TomasVotruba

Copy link
Copy Markdown
Member Author

That would make little sense, as we group by domain and want to provide deterministic rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants